#pragma once
#include "Obstacle.h"

class Character;

class Trap : public Obstacle {
protected:
	int m_numTriggers;
	bool m_isVisible;
public:
	Trap(TrapType type, int numTriggers);
	Trap(std::ifstream& file);
	~Trap();
	bool isVisible() const;
	void render(float x, float y);
	void logDetails(TextLog& log) const;
	void setVisible();
	void trigger(Character* c);
	int getNumTriggers() const;
	void save(std::ofstream& file) const;
};

inline bool Trap::isVisible() const {return m_isVisible;}
inline void Trap::setVisible() {m_isVisible = true;}
inline int Trap::getNumTriggers() const {return m_numTriggers;}
